<script setup lang='ts'>
import SuanFa from '@/components/SuanFa.vue';
import { ref, reactive } from 'vue'

interface  dd{
  value:any |string
}
let onjk:dd=ref([
  {
        id:1,
    title:'ee',
  },
    {
        id:51,
    title:'ee5',
  },
    {
        id:523,
    title:'eew',
  },
    {
        id:112,
    title:'e1e',
  },
])
let onjkq:dd=reactive

([
  {
        id:1,
    title:'sdfb',
  },
    {
        id:51,
    title:'下次V型出',
  },
    {
        id:523,
    title:'征信查询',
  },
    {
        id:112,
    title:'e1e美女',
  },
])


let LL=(index: any)=>{
  onjk.value.pop(index, 1)
}
let Rr=(index:any)=>{
if(index>=0 && onjkq.length-1){
  onjkq.splice(index, 1)
}
}
let ss=[1,2,3,4,5]

let number=1
for (let i = 0; i < ss.length; i++) {
   number+=ss[i]//相加
}
console.log(number)
// 
let  reduces=ss.reduce((emo,ojbk)=>{
  return  emo+ojbk
})
console.log(reduces);//相加

</script>

<template>
  <div class="sfsf">
 <SuanFa/>
<div class="d" v-for="(item, index) in onjk" :key="index">
{{ item.title }}<button @click="LL(index)">scrf</button></div>
<div class="ddc" v-for="(item, index) in onjkq" :key="index">
{{ item.title }}
<button @click="Rr(index)">scrv</button>
<Hospitalvisits/>
</div>
  </div>
</template>

<style lang='scss' scoped>

</style>